package com.duoqin.payservice.data;

import com.google.gson.annotations.SerializedName;

import java.util.List;

public class HistoryResponse {

    /**
     * code : 0
     * msg : 成功
     * data : {"total":6,"histories":[{"id":1,"userId":4,"balanceChange":30,"description":"用户充值","unit":"recharge","quantity":1,"createAt":1539252099655},{"id":2,"userId":4,"balanceChange":30,"description":"用户充值","unit":"recharge","quantity":1,"createAt":1539252205722},{"id":3,"userId":4,"balanceChange":30,"description":"用户充值","unit":"recharge","quantity":1,"createAt":1539252282952},{"id":4,"userId":4,"balanceChange":-0.01,"description":"用户使用扣费","unit":"character","quantity":10,"createAt":1539252461841},{"id":5,"userId":4,"balanceChange":-9.9,"description":"用户使用扣费","unit":"sec","quantity":100,"createAt":1539252479345},{"id":6,"userId":4,"balanceChange":30,"description":"用户充值","unit":"recharge","quantity":1,"createAt":1539252857602}]}
     */

    @SerializedName("code")
    private int code;
    @SerializedName("msg")
    private String msg;
    @SerializedName("data")
    private DataBean data;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public DataBean getData() {
        return data;
    }

    public void setData(DataBean data) {
        this.data = data;
    }

    public static class DataBean {
        /**
         * total : 6
         * histories : [{"id":1,"userId":4,"balanceChange":30,"description":"用户充值","unit":"recharge","quantity":1,"createAt":1539252099655},{"id":2,"userId":4,"balanceChange":30,"description":"用户充值","unit":"recharge","quantity":1,"createAt":1539252205722},{"id":3,"userId":4,"balanceChange":30,"description":"用户充值","unit":"recharge","quantity":1,"createAt":1539252282952},{"id":4,"userId":4,"balanceChange":-0.01,"description":"用户使用扣费","unit":"character","quantity":10,"createAt":1539252461841},{"id":5,"userId":4,"balanceChange":-9.9,"description":"用户使用扣费","unit":"sec","quantity":100,"createAt":1539252479345},{"id":6,"userId":4,"balanceChange":30,"description":"用户充值","unit":"recharge","quantity":1,"createAt":1539252857602}]
         */

        @SerializedName("total")
        private int total;
        @SerializedName("histories")
        private List<HistoriesBean> histories;

        public int getTotal() {
            return total;
        }

        public void setTotal(int total) {
            this.total = total;
        }

        public List<HistoriesBean> getHistories() {
            return histories;
        }

        public void setHistories(List<HistoriesBean> histories) {
            this.histories = histories;
        }

        public static class HistoriesBean {
            /**
             * id : 1
             * userId : 4
             * balanceChange : 30
             * description : 用户充值
             * unit : recharge
             * quantity : 1
             * createAt : 1539252099655
             */

            @SerializedName("id")
            private int id;
            @SerializedName("userId")
            private int userId;
            @SerializedName("balanceChange")
            private double balanceChange;
            @SerializedName("description")
            private String description;
            @SerializedName("unit")
            private String unit;
            @SerializedName("quantity")
            private int quantity;
            @SerializedName("createAt")
            private long createAt;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public int getUserId() {
                return userId;
            }

            public void setUserId(int userId) {
                this.userId = userId;
            }

            public double getBalanceChange() {
                return balanceChange;
            }

            public void setBalanceChange(double balanceChange) {
                this.balanceChange = balanceChange;
            }

            public String getDescription() {
                return description;
            }

            public void setDescription(String description) {
                this.description = description;
            }

            public String getUnit() {
                return unit;
            }

            public void setUnit(String unit) {
                this.unit = unit;
            }

            public int getQuantity() {
                return quantity;
            }

            public void setQuantity(int quantity) {
                this.quantity = quantity;
            }

            public long getCreateAt() {
                return createAt;
            }

            public void setCreateAt(long createAt) {
                this.createAt = createAt;
            }
        }
    }
}
